package com.dc.feign;


import com.dc.common.ResponseResultVO;
import com.dc.entity.SysUser;
import com.dc.model.SysOperLog;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * system模块服务调用
 * , url = "http://192.168.0.69:20000"
 */
@FeignClient(value = "dc-control-system", url = "http://192.168.0.69:20000")
public interface SystemApiServiceFeign {

    @RequestMapping(value = "/operLog/add", method = RequestMethod.POST)
    ResponseResultVO add(@RequestBody SysOperLog operLog);

    @RequestMapping(value = "/sys/user/selectAllUser", method = RequestMethod.GET)
    ResponseResultVO<List<SysUser>> selectAllUser();


    @RequestMapping(value = "/config/selectConfigValue", method = RequestMethod.GET)
    String selectConfigValue(@RequestParam String key);

    @RequestMapping(value = "/systemMessage/sendWebsocketMessage", method = RequestMethod.GET)
    ResponseResultVO sendWebsocketMessage(@RequestParam String content, @RequestParam(required = false) List<String> userIds);

    @RequestMapping(value = "/diction/selectDictionaryByType", method = RequestMethod.GET)
    ResponseResultVO selectDictionaryByType(@RequestParam String type);
}
